﻿using CommunityToolkit.Mvvm.ComponentModel;
using Rubyer;
using System.Collections.ObjectModel;


namespace StockUI.Model
{
    /// <summary>
    /// 汉堡包菜单模型
    /// </summary>
    public partial class HamburgerMenuModel : ObservableObject
    {
        /// <summary>
        /// 名称
        /// </summary>
        [ObservableProperty]
        private string name;

        /// <summary>
        /// 图标
        /// </summary>
        [ObservableProperty]
        private IconType? icon;

        /// <summary>
        /// 是否可用
        /// </summary>
        [ObservableProperty]
        private bool isEnable;

        /// <summary>
        /// 内容
        /// </summary>
        [ObservableProperty]
        private object content;

        [ObservableProperty]
        private ObservableCollection<HamburgerMenuModel> childs;

        public HamburgerMenuModel(string name, object content, IconType? icon, bool isEnable = true)
        {
            Name = name;
            Content = content;
            Icon = icon;
            IsEnable = isEnable;
        }
    }

    /// <summary>
    /// 汉堡包菜单模型
    /// </summary>
    public partial class HamburgerMenuSigleModel : ObservableObject
    {
        /// <summary>
        /// 名称
        /// </summary>
        [ObservableProperty]
        private string name;

        /// <summary>
        /// 图标
        /// </summary>
        [ObservableProperty]
        private IconType? icon;

        /// <summary>
        /// 是否可用
        /// </summary>
        [ObservableProperty]
        private bool isEnable;


        [ObservableProperty]
        private ObservableCollection<HamburgerMenuSigleModel> childs;

        public HamburgerMenuSigleModel(string name,  IconType? icon, bool isEnable = true)
        {
            Name = name;
            Icon = icon;
            IsEnable = isEnable;
        }
    }
}
